package com.cet.designpatterns.prototype;

import java.util.ArrayList;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-09-06 14:30
 **/
public class Client {
    public static void main(String[] args) {
        Sheep sheep = new Sheep("tom", 1, "白色");

        ArrayList<Sheep> sheepList = new ArrayList<>();
        for (int i = 0; i < 5; i++) {
            sheepList.add(new Sheep(sheep.getName(), sheep.getAge(), sheep.getColor()));
        }
        sheepList.forEach(System.out::println);
    }
}
